In some programming environments, an application may call an event handler to perform certain tasks. For example, an application might call an event handler associated with a User Interface (“UI”). The event handler may, in some cases, detect that an error has occurred. For example, a parameter entered by a user via a UI might be outside of an allowable range of values. One way to handle such an error is to have the event handler display an error message to the user via the UI. This technique, however, might result in an error message that may not be easily understood by the user. Moreover, it may mix user interaction logic with business logic which can be lead to errors and difficult to understand software.
As another way of handling the error, the event handler might raise an exception to be handled by the application. This approach may also have several disadvantages. For example, a pending error exception might be overwritten by a subsequent error detected by the event handler. Moreover, event handlers may be associated with signatures that list all input parameters, output parameters, and exceptions associated with the event handler. When multiple parties use such an event handler, each party may need to continuously update the signature (and associated software) to include new exceptions that are being added by other parties. Such an approach can be a time consuming and error prone process.
Accordingly, systems and methods to automatically and efficiently facilitate the processing of event handler errors may be provided in association with some embodiments described herein.